/**
 * Created by maple on 2016/6/9.
 */
var express = require('express');
var router = express.Router();
var reportChar = require('../public/reportChar');


router.use('/', function (req, res) {
    var strs = req.param('strs');
    if (strs == undefined || strs == null || strs.length <= 0) {
        var result = {
            status: 0,
            data: null,
            info: '请正确填写需要检测的文字'
        };
        res.send(result);
    }
    else {
        reportChar(strs, function (result) {
            res.send(result);
        });
    }

})

module.exports = router;